/*
 *  Copyright © 2011 by Rob Cash
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 * RegistryServiceProviderManager.java
 *
 * Created on Jun 21, 2011 at 7:50:48 PM
 */

package org.robcash.apps.bookmarksync.provider;



import org.robcash.commons.plugin.PlugInManagerException;
import org.robcash.commons.plugin.impl.registry.JAXBRegistryInspector;
import org.robcash.commons.plugin.impl.registry.RegistryPlugInManager;
import org.robcash.xmlns.commons.plugin.registry.PlugInInfoType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * The plug-in manager is responsible for discovering and initializing contact
 * service providers.
 * @author Rob Cash
 */
public class RegistryServiceProviderManager extends RegistryPlugInManager<BookmarkServiceProvider, PlugInInfoType>
{
	@SuppressWarnings("unused")
	private static final Logger LOG = LoggerFactory.getLogger(RegistryServiceProviderManager.class);
	private static final String REGISTRY_RESOURCE = "META-INF/services/bookmarkSyncRegistry.xml";

	/**
	 * Initialize the plug-in manager
	 * @throws PlugInManagerException
	 */
	public void init() throws PlugInManagerException
	{
		super.setRegistryResource(REGISTRY_RESOURCE);
		super.setRegistryInspector(new JAXBRegistryInspector());
		super.discoverPlugIns();
	}

}
